#include<iostream>
#include"EquationSolver.h"
#include<cmath>
#include<limits>

double Function::operator()(double _x)
{
  return (89*sin(_x)*cos(_x)*sin(11.5*M_PI/180) + 89*sin(_x)*sin(_x)*cos(11.5*M_PI/180) - (64*sin(11.5*M_PI/180) - 15 * tan(11.5*M_PI/180))*cos(_x) - ((64*cos(11.5*M_PI/180)) - 15)*sin(_x));
}

double Function::diff(double _x)
{
  return (89*cos(2 * _x)*sin(11.5*M_PI/180) +  89*2*sin(_x)*cos(_x)*cos(11.5*M_PI/180) + (64*sin(11.5*M_PI/180) - 15 * tan(11.5*M_PI/180))*sin(_x) - ((64*cos(11.5*M_PI/180)) - 15)*cos(_x));
}

int main(){
  Function f;
  Newton New( 33*M_PI/180, 1000, f);
  New.solve();
  return 0;
}
